0f18e46b25368b6a3fc30f55769eeec1ecc41670,jtss/src/test/java/ec/tss/tsproviders/cursor/TsCursorsTest.java,TsCursorsTest,assertCloseState,#TsCursor#,282
Before Change
assertThat(cursor.isClosed()).isFalse();
cursor.close();
assertThat(cursor.isClosed()).isTrue();
assertThatThrownBy(() -> cursor.getMetaData()).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(() -> cursor.nextSeries()).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(() -> cursor.getSeriesId()).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(() -> cursor.getSeriesData()).isInstanceOf(IllegalStateException.class);
assertThatThrownBy(() -> cursor.getSeriesMetaData()).isInstanceOf(IllegalStateException.class);
assertThat(cursor.filter(o -> true)).isNotNull();
assertThat(cursor.onClose(() -> {
})).isNotNull();
After Change
cursor.close();
cursor.close(); // subsequent calls must have no effects
assertThat(cursor.isClosed()).isTrue();
assertThatThrownBy(() -> cursor.getMetaData()).isInstanceOf(IllegalStateException.class).hasMessage(CLOSE_ISE);
assertThatThrownBy(() -> cursor.nextSeries()).isInstanceOf(IllegalStateException.class).hasMessage(CLOSE_ISE);
assertThatThrownBy(() -> cursor.getSeriesId()).isInstanceOf(IllegalStateException.class).hasMessage(CLOSE_ISE);
assertThatThrownBy(() -> cursor.getSeriesData()).isInstanceOf(IllegalStateException.class).hasMessage(CLOSE_ISE);
assertThatThrownBy(() -> cursor.getSeriesMetaData()).isInstanceOf(IllegalStateException.class).hasMessage(CLOSE_ISE);
assertThat(cursor.filter(o -> true)).isNotNull();
assertThat(cursor.onClose(() -> {
})).isNotNull();